package com.black.play.listener.key;

import java.awt.*;
import java.awt.event.KeyEvent;

/**
 * @author ylx
 */
public abstract class EnterKeyAdapter<T extends Component> extends KeyCodeAdapter<T> {
    public EnterKeyAdapter(T component) {
        super(component);
    }

    public EnterKeyAdapter(T component, boolean isPreventDefault) {
        super(component, isPreventDefault);
    }

    @Override
    public abstract void keyPressed();

    @Override
    public int targetKeyCode() {
        return KeyEvent.VK_ENTER;
    }
}
